<template>
    <el-main style="padding: 10px 0px 0px 0px;">
        <div id="main">
            <router-view v-if="isRouterAlive"></router-view>
        </div>
        <Footer></Footer>
    </el-main>
</template>

<style scoped lang="less">
#main{
    width: 80%;
    margin: 10px auto;
    padding: 10px 0px 0px 0px;
    border-radius: 4px;
}
</style>

<script>
  import Footer from "@/views/Footer.vue";
  export default {
      components: {
          Footer,
      },
      provide () {
          return {
              reload: this.reload
          }
      },
      data () {
          return {
              isRouterAlive: true
          }
      },
      methods: {
          reload () {
              this.isRouterAlive = false
              this.$nextTick(function () {
                  this.isRouterAlive = true
              })
          }
      }
  }
</script>